//
//  XD_RecommendHeaderView.swift
//  XueDao
//
//  Created by wenwen on 2021/3/6.
//

import UIKit

class XD_RecommendHeaderView: UIView {
    
    lazy var titleLab: UILabel = {
        let titleLab = UILabel()
        titleLab.font = .xsFont(name: .semibold, .scale * 18)
        titleLab.textColor = UIColor(red: 0.22, green: 0.24, blue: 0.25, alpha: 1.0)
        titleLab.text = "推荐课程"
        
        return titleLab
    }()
    
    lazy var changedBtn: UIButton = {
        let changedBtn = UIButton(type: .custom)
        changedBtn.setImage(UIImage(named: "icon_12px_删选_1"), for: .normal)
        changedBtn.setTitle("  换一换", for: .normal)
        changedBtn.setTitleColor(UIColor(red: 0.45, green: 0.47, blue: 0.49, alpha: 1.0), for: .normal)
        changedBtn.titleLabel?.font = .xsFont(name: .regular, .scale*14)
        
        return changedBtn
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        addSubview(titleLab)
        titleLab.snp.makeConstraints { (make) in
            make.top.equalTo(.scale * 16)
            make.left.equalTo(.scale * 16)
            make.bottom.equalTo(-.scale * 16)
        }
        
        addSubview(changedBtn)
        changedBtn.snp.makeConstraints { (make) in
            make.top.equalTo(.scale * 16)
            make.right.equalTo(-.scale * 16)
            make.bottom.equalTo(-.scale * 16)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
